<?php

//获取一个路径下所有文件名称，一定不能有中文，否则会出错！
function getDocFileNames($path)
{
        $arr = array();
        if ($handle = opendir($path)) {
                while (false !== ($file = readdir($handle))) {
                        if ( $file != ".." && $file != "." ) {
                                $arr[] = $file;
                        }
                }
                closedir($handle);
        }
        return $arr;
}

function formatTimeStudy($seconds){
    if(!empty($seconds)){
            $hours = intval($seconds/3600);
            $minutes = intval(($seconds - $hours*3600)/60);
            $sec = $seconds % 60;
            echo $hours."小时".$minutes."分".$sec."秒";
    }
 }
        
